package com.nali.dal.statement.upsert;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import com.nali.dal.expression.Expression;
import com.nali.dal.expression.ExpressionValue;
import com.nali.dal.statement.query.ExpressionValueDesc;

public class ExpressionValueConfig<T extends Expression> {
	private List<ExpressionValueDesc<T>> descs;
	
	public ExpressionValueConfig(List<ExpressionValueDesc<T>> descs) {
		super();
		this.descs = descs;
	}

	public List<ExpressionValue<T>> getExpressionValueList(Map<String, Object> params) {
		List<ExpressionValue<T>> rlt = new ArrayList<ExpressionValue<T>>(descs.size());
		for (ExpressionValueDesc<T> desc : descs) {
			rlt.add(desc.getExpressionValue(params));
		}
		return rlt;
	}

}
